﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" ValidateRequest="false" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Clannan</title>
    <link href="../../Content/jquery.ui.resizable.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/jquery.JScrollPane.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/Notepad_Index.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui-1.8.23.core.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui-1.8.23.widget.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.ui-1.8.23.mouse.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui-1.8.24.resizable.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui-1.8.23.accordion.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui-1.8.23.sortable.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui-1.8.23.draggable.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui-1.8.23.droppable.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.athome.idAnaly.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.athome.followParent.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.athome.followParent.1.2.0.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.athome.json.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.athome.slider.1.0.0.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.athome.buttonActive.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.athome.js" type="text/javascript"></script>
    <script src="../../Scripts/Notepad_Index_SizePosition.js" type="text/javascript"></script>
    <script src="../../Scripts/Notepad_Index_CursorActive.js" type="text/javascript"></script>
    <script src="../../Scripts/Notepad_Index_Slider.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.contextmenu.js" type="text/javascript"></script>
    <script src="../../Scripts/NotePad_Index_Load.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.mousewheel.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.jScrollPane.js" type="text/javascript"></script>
    <script src="../../Scripts/NotePad_Index_Browser.js" type="text/javascript"></script>
    <script src="../../Scripts/Notepad_Index_Ajax.js" type="text/javascript"></script>
    <script src="../../Scripts/Notepad_Index_JQajax.js" type="text/javascript"></script>
    <script src="../../Scripts/Notepad_Index_Active.js" type="text/javascript"></script>
    <script src="../../Scripts/Notepad_Index_ActiveBook.js" type="text/javascript"></script>
    <script src="../../Scripts/Notepad_Index_ActiveArea.js" type="text/javascript"></script>
    <script src="../../Scripts/Notepad_Index_ActivePage.js" type="text/javascript"></script>
    <script src="../../Scripts/Notepad_Index_ActivePiece.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.rename.js" type="text/javascript"></script>
    <script src="../../Scripts/Silverlight.js" type="text/javascript"></script>
    <script src="../../Js/CmjUpload.js" type="text/javascript"></script>
    <script src="../../Tools/ckeditor/ckeditor.js" type="text/javascript"></script>
    <script type="text/javascript">
        function onSilverlightError(sender, args) {
            var appSource = "";
            if (sender != null && sender != 0) {
                appSource = sender.getHost().Source;
            }

            var errorType = args.ErrorType;
            var iErrorCode = args.ErrorCode;

            if (errorType == "ImageError" || errorType == "MediaError") {
                return;
            }

            var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n";

            errMsg += "Code: " + iErrorCode + "    \n";
            errMsg += "Category: " + errorType + "       \n";
            errMsg += "Message: " + args.ErrorMessage + "     \n";

            if (errorType == "ParserError") {
                errMsg += "File: " + args.xamlFile + "     \n";
                errMsg += "Line: " + args.lineNumber + "     \n";
                errMsg += "Position: " + args.charPosition + "     \n";
            }
            else if (errorType == "RuntimeError") {
                if (args.lineNumber != 0) {
                    errMsg += "Line: " + args.lineNumber + "     \n";
                    errMsg += "Position: " + args.charPosition + "     \n";
                }
                errMsg += "MethodName: " + args.methodName + "     \n";
            }

            throw new Error(errMsg);
        }

        pluginLoaded = function () {
            $.CmjUpload({ id: 'cmjUpload1', requestUrl: 'http://localhost:18003/clientUpload/Upload.ashx', fileTypes: '*.jpg|*.png|*.wmv|*.rar|*.iso', limitCount: 5, limitSize: 150 });
            //var upload = new CmjUpload({ id: 'cmjUpload1', requestUrl: 'http://localhost:18003/clientUpload/Upload.ashx', fileTypes: '*.jpg|*.png|*.wmv|*.rar|*.iso', limitCount: 5, limitSize: 150 });
        }
    </script>
    <script type="text/javascript">
        $(function () {
            $.browser32();
            $("#bookList").ajaxLoadData32();
            $.JQactive32.commonActive();


            $("#regionInner").droppable({
                scope: "pieces",
                drop: function (e, ui) {
                    var $regionInner = $(this);
                    var $defaults = $("#defaultPieces"); //笔记块模板集合
                    var $clone; //被克隆出来的对象
                    if (ui.helper.hasClass("imgBuildWrite")) {
                        $clone = $defaults.find(".Write").clone();
                    } else if (ui.helper.hasClass("imgBuildDraw")) {
                        $clone = $defaults.find(".draw").clone();
                    } else if (ui.helper.hasClass("imgBuildPhoto")) {
                        $clone = $defaults.find(".photo").clone();
                    } else if (ui.helper.hasClass("imgBuildRecord")) {
                        $clone = $defaults.find(".record").clone();
                    } else if (ui.helper.hasClass("imgBuildPicture")) {
                        $clone = $defaults.find(".picture").clone();
                    } else if (ui.helper.hasClass("imgBuildFile")) {
                        $clone = $defaults.find(".file").clone();
                    } 
                    $clone.show().appendTo($regionInner);
                    $clone.followParent32({
                        left: e.clientX - $("#regionInner").offset().left,
                        top: e.clientY - $("#regionInner").offset().top
                    });
                    $clone.piece32({ active: true });
                    $clone.mousedown();
                }
            });
    });
    </script>

</head>
<body>


<div id="whole">
    <div id="bg1"></div>
    <div id="bg2"></div>
    <div id="bg3"></div>
    <div id="bg4"></div>
    <div id="bgTop">
            <img class="bg" src="../../Images/Note/top.jpg" />
            <img class="logo" src="../../Images/Note/logo.jpg" />
            <ul class="guide">
                <li>AtHome</li>
                <li>社区</li>
                <li>设置</li>
                <li>帐户</li>
            </ul>
        </div>
  <div id="bgBottom">
        <img class="bg" src="../../Images/Note/bottom.jpg" />
        <ul id="toolBoard">
            <li><img title="写字板" src="../../Images/Note/BottomBoard_Write.png" class="imgBuildWrite" /></li>
            <li><img title="绘画板" src="../../Images/Note/BottomBoard_Draw.png" class="imgBuildDraw" /></li>
            <li><img title="照相馆" src="../../Images/Note/BottomBoard_photo.png" class="imgBuildPhoto" /></li>
            <li><img title="录音机" src="../../Images/Note/BottomBoard_Record.png" class="imgBuildRecord"/></li>
            <li><img title="图片" src="../../Images/Note/BottomBoard_Picture.png" class="imgBuildPicture"/></li>
            <li><img title="附件" src="../../Images/Note/BottomBoard_File.png" class="imgBuildFile"/></li>
        </ul>
    </div>
    <div id="bgLeft" class="divLeft"><img class="bg" src="../../Images/Note/left.jpg" /></div>
    <div id="bgRight" class="divRight"><img class="bg" src="../../Images/Note/right.jpg" /></div>

   <div id="window">
        <div id="titleBar">

            <!--搜索功能，开始-->
            <div id="search" class="divSearch">
                <input type="text" id="txtSearch" name="txtSearch" class="txtSearch" />
                <input type="button" id="btnSearch" name="btnSearch" class="btnSearch" />
            </div>
            <!--搜索功能，结束-->

        </div>
        
   <div id="windowInner">

            <!--笔记本列表的模块开始-->
              <div id="plateBook">
                <div id="bookList"></div><!--笔记本列表-->
                <div id="bookShrink1"></div><!--收缩按钮-->
                <div class="line1"></div><!--上边线-->
                <div class="line2"></div><!--下边线-->
                <div id="recycleBin"></div><!--回收站-->
                <div id="stretch1"></div><!--伸展按钮-->
                <img id="newBook" src="../../Images/Note/plateBookAddBook.gif" />
                <script type="text/javascript">
                    $(function () {
                        $("#recycleBin").dblclick(function () {
                            $("#rubbishBox").rubbishBoxFacade_();
                        });
                    });
                </script>
            </div>
            <!--笔记本列表的模块结束-->




            <!--笔记页列表的模块开始-->
            <div id="platePage">
                <div id="pageShrink2"></div><!--收缩按钮-->
                <div class="line1"></div><!--上边线-->
                <div id="pageList"></div><!--页列表-->
                <div id="stretch2"></div><!--伸展按钮-->
                <select id="doSort">
                    <option value="user">按用户排序</option>
                    <option value="create">按创建时间排序</option>
                    <option value="update">按更新排序</option>
                </select>
            </div>
            <!--笔记页列表的模块结束-->






            <!--plateRegion，开始-->
                <div id="plateRegion">
                    <div id="toolBar">
                        <img class="save" title="保存该页内容" src="../../Images/Note/plateRegionSave.gif" />
                        <img class="share" title="共享该页" src="../../Images/Note/plateRegionShare.gif" />
                        <img class="add" title="新建页" src="../../Images/Note/plateRegionAdd.gif" />
                        <img class="del" title="删除至回收站" src="../../Images/Note/plateRegionDel.gif" />
                    </div><!--工具栏-->
                    <div id="infBar">
                        <div class="titleOuter"><span class="title">当前的页名称</span></div>
                    </div><!--信息栏-->


                    <div id="defaultPieces" style=" display:none;">

                            <div class="piece write" style=" width:440px; height:346px;">
                                <div class="head">
                                    <span class="title">我的写字板</span>
                                </div>
                                <div class="del"></div>
                                <div class="tool"></div>
                                <div class="body">
                                    <textarea name="myTextarea" id="myTextarea" class="ckeditor" rows="2" cols="20" ></textarea>
                                </div>
                            </div>

                            <div class="piece draw" style="">
                                <div class="head">
                                    <span class="title">我的绘画板</span>
                                </div>
                                <div class="del"></div>
                                <div class="tool"></div>
                                <div class="body"></div>
                            </div>


                            <div class="piece photo" style=" width:604px; height:430px;">
                                <div class="head">
                                    <span class="title">我的照相馆</span>
                                </div>
                                <div class="del"></div>
                                <div class="tool"></div>
                                <div class="body">
                                    <div class="silverlightControl">
                                        <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
		                                <param name="source" value="../../clientUpload/SilverlightCameraAndMicrophone.xap"/>
		                                <param name="onError" value="onSilverlightError" />
		                                <param name="background" value="white" />
		                                <param name="minRuntimeVersion" value="5.0.61118.0" />
		                                <param name="autoUpgrade" value="true" />
		                                <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none">
 			                                <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
		                                </a></object><iframe id="Iframe1" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
                                     </div>
                                </div>
                            </div>


                            <div class="piece record" style="">
                                <div class="head">
                                    <span class="title">我的录音机</span>
                                </div>
                                <div class="del"></div>
                                <div class="tool"></div>
                                <div class="body"></div>
                            </div>


                            <div class="piece picture" style=" width:384px; height:382px;">
                                <div class="head">
                                    <span class="title">我的相册</span>
                                </div>
                                <div class="del"></div>
                                <div class="tool"></div>
                                <div class="body">
                                    <div class="silverlight1">
                                        <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
		                                  <param name="source" value="../../clientImage/UploadImage.xap"/>
		                                  <param name="onError" value="onSilverlightError" />
		                                  <param name="background" value="white" />
		                                  <param name="minRuntimeVersion" value="5.0.61118.0" />
		                                  <param name="autoUpgrade" value="true" />
		                                  <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="text-decoration:none">
 			                                  <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
		                                  </a>
	                                    </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
                                     </div>
                                </div>
                            </div>

                            <script language="javascript" type="text/javascript">
                                function TestFunc() {
                                    //$(".silverlight1").hide();
                                    alert(123);
                                } 
                                function phoneFun() {
                                    $(".silverlightControl").hide();
                                }
                             </script>

                            <div class="piece file" style=" width:398px; height:150px;">
                                <div class="head">
                                    <span class="title">我的附件</span>
                                </div>
                                <div class="del"></div>
                                <div class="tool"></div>
                                <div class="body">
                                    <div id="silverlightControlHost">
                                        <object id="cmjUpload1" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
		                                  <param name="source" value="../../ClientBin/CmjUpload.xap"/>
		                                  <param name="onError" value="onSilverlightError" />
                                          <param name="onLoad" value="pluginLoaded" /><!--注意这里，必须保证配置信息在页面加载之后执行-->
                                          <param name="culture" value="zh-CN" /><!--注意这里本地化配置-->
                                          <param name="uiculture" value="zh-CN" /><!--注意这里本地化配置-->
		                                  <param name="background" value="white" />
		                                  <param name="minRuntimeVersion" value="5.0.61118.0" />
		                                  <param name="autoUpgrade" value="true" />
		                                  <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none">
 			                                  <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
		                                  </a>
	                                    </object><iframe id="Iframe2" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
                                    </div>
                                </div>
                            </div>

                    </div>

                    <div id="region">
                        <div id="regionInner">

<%--                            <div class="piece write">
                                <div class="head">
                                    <span class="title">我的写字板</span>
                                </div>
                                <div class="del">d</div>
                                <div class="tool">d</div>
                                <div class="pBody">d</div>
                            </div>

                            <div class="piece file" style="">
                                <div class="head">
                                    <span class="title">我的附件</span>
                                </div>
                                <div class="del">d</div>
                                <div class="tool">d</div>
                                <div class="pBody">d</div>
                            </div>--%>

                        </div>
                    </div>


                </div>
     <%--         <!--plateRegion，结束-->

             <div id="plateRegion" class="plateNote">
                <div id="toolBar"></div><!--工具栏-->
                <div class="headBar"></div>

                <div style=" display:none;">
                    <input type="text" id="txtNotePageTitle" name="txtNotePageTitle" class="txtNotePageTitle" />
                </div>
                <div class="statusBar" style=" display:none;" style=" display:none;">
                    <span class="dateCreate">创建日期：2012-10-5</span>
                    <span class="dateUpdate">更新日期：2012-10-6</span>
                </div>

                <!--笔记块模板，开始-->
                <div class="defaultPieces" style=" display:none; position:relative;">
                    <div class="piece write" style=" display:none;">
                        <div class="head">
                            <span class="title">我的写字板</span>
                            <input class="editTitle" type="text" />
                            <div class="del"></div>
                        </div>
                        <div class="tool"></div>
                        <div class="body"></div>
                    </div>
                    
                    <div class="piece draw" style=" display:none;">
                        <div class="head">
                            <span class="title">我的画板</span>
                            <input class="editTitle" type="text" />
                            <div class="del"></div>
                        </div>
                        <div class="tool"></div>
                        <div class="body"></div>
                    </div>

                    
                    <div class="piece photo" style=" display:none;">
                        <div class="head">
                            <span class="title">我的照片</span>
                            <input class="editTitle" type="text" />
                            <div class="del"></div>
                        </div>
                        <div class="tool"></div>
                        <div class="body"></div>
                    </div>

                    
                    <div class="piece video" style=" display:none;">
                        <div class="head">
                            <span class="title">我的视频</span>
                            <input class="editTitle" type="text" />
                            <div class="del"></div>
                        </div>
                        <div class="tool"></div>
                        <div class="body"></div>
                    </div>
                </div>
                <!--笔记块模板，结束-->

                <!--笔记内容区域，开始-->
                <div id="region">
                    <div id="regionInner" class="NotePageContent">
                
                        <div class="piece video" style=" left:2030px; top:950px;">
                            <div class="head">
                                <span class="title">我的视频</span>
                                <input class="editTitle" type="text" />
                                <div class="del"></div>
                            </div>
                            <div class="tool"></div>
                            <div class="body"></div>
                        </div>

                    </div>
                </div>
                <!--笔记内容区域，结束-->




            </div>
            <!--笔记页内容的模块结束-->
--%>

        </div>

    </div>


    <!--选择笔记本列表的类型，开始-->
    <div id="tabNotebookListType">
        <div class="base notebook"><span>笔<br />记</span></div>
        <div class="base note"><span>便<br />签</span></div>
    </div>
    <script type="text/javascript">
        $(function () {
            $("#tabNotebookListType").find("span").followParent_({
                center: true,
                middle: true
            })
            $("#tabNotebookListType").find("div.base").buttonActive_({
                over: "enter",
                down: "down",
                click: function () {
                    var oneself = $(this);
                    if (oneself.hasClass("notebook")) {
                        $.bookAreaPage32({
                            noteType: "notebook"
                        });
                    } else if (oneself.hasClass("note")) {
                        $.bookAreaPage32({
                            noteType: "note"
                        });
                    }
                }
            });
        });
    </script>
    <!--选择笔记本列表的类型，结束-->

    <!--垃圾文件窗，开始-->
    <div id="rubbishBox" style=" display:none; position:absolute;">
        <div class="head">
            <span class="title">垃圾中转站</span>
            <div class="delete"></div>
        </div>
        <div class="body"></div>
    </div>
    <script type="text/javascript">
        $(function () {
            $("#rubbishBox").rubbishBoxAction_();

            
        });
    </script>
    <!--垃圾文件窗，结束-->


    <!--这些值用在拉伸功能-->
    <input id="plateBookWidth" type="hidden" value="" />
    <input id="platePageWidth" type="hidden" value="" />
    <input id="plateRegionWidth" type="hidden" value="" />


    <!--这些值用在记录当前打开的-->
    <input id="currentArea" type="hidden" value="" />
    <input id="currentPage" type="hidden" value="" />




        <!--右键快捷菜单群，开始-->
    <div id="menu_notebook" style=" position:absolute; display:none;">
        <ul>
            <li id="menu_book_Add">创建分区</li>
            <li id="menu_book_Share">共享</li>
            <li id="menu_book_ReName">重命名</li>
            <li id="menu_book_Del">彻底删除</li>
        </ul>
    </div>

    <div id="menu_area" style=" position:absolute; display:none;">
        <ul>
            <li id="menu_area_Add">创建页</li>
            <li id="menu_area_Share">共享</li>
            <li id="menu_area_ReName">重命名</li>
            <li id="menu_area_Del">彻底删除</li>
        </ul>
    </div>

    <div id="menu_page" style=" position:absolute; display:none;">
        <ul>
            <li id="menu_page_Share">共享</li>
            <li id="menu_page_ReName">重命名</li>
            <li id="menu_page_Del">彻底删除</li>
        </ul>
    </div>

    <div id="menu_piece" style=" display:none;">
        <ul>
            <li id="menu_piece_ReName">重命名</li>
        </ul>
    </div>
    <!--右键快捷菜单群，结束-->




    <div id="areaHelperClone" style=" position:absolute; width:100px; height:100px; background-color:Aqua; display:none;"></div>

</div>











</body>
</html>
